<template>
  <el-card>
    <template #header>
      <div class="clearfix">
        <span>充电记录</span>
        <el-button @click="router.push('/home/partner/investors/add')" style="float: right; padding: 3px 0" type="text">添加</el-button>
      </div>
    </template>
    <el-table :data="rechargeList" border style="width: 100%">
      <el-table-column prop="orderNumber" label="充值订单号" ></el-table-column>
      <el-table-column prop="time" label="时间"></el-table-column>
      <el-table-column prop="customerName" label="客户名称" ></el-table-column>
      <el-table-column prop="contactNumber" label="联系电话"></el-table-column>
      <el-table-column prop="transactionType" label="交易类型"></el-table-column>
      <el-table-column prop="paymentMethod" label="支付方式" ></el-table-column>
      <el-table-column prop="rechargeObject" label="充值对象" ></el-table-column>
      <el-table-column prop="rechargeAmount" label="充值金额" ></el-table-column>
      <el-table-column prop="accountBalance" label="充值账户余额" ></el-table-column>
      <el-table-column prop="transactionStatus" label="交易状态" ></el-table-column>
    </el-table>
  </el-card>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { fetchRechargeList } from "../../../../api/RechargeApi.ts";
import router from "../../../../router";

const rechargeList = ref([]);

const getRechargeList = async () => {
  const res = await fetchRechargeList();
  if (res.code === 200) {
    rechargeList.value = res.data
  }
};


getRechargeList();

</script>

<style scoped>
.el-card {
  margin-top: 20px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 #ffffff;
  outline: 0;
}
</style>
